﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SearchBaoJia.aspx.cs" Inherits="Workflow.BaoJia.SearchBaoJia" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="../Css/style.css" />
    <script type="text/javascript" src="../Js/jquery.js"></script>
    <script type="text/javascript" src="../Js/jquery.sorted.js"></script>
    <script type="text/javascript" src="../Js/bootstrap.js"></script>
    <script type="text/javascript" src="../Js/ckform.js"></script>
    <script type="text/javascript" src="../Js/common.js"></script>

    <script type="text/javascript" src="../Scripts/MyJquery.js"></script>
    <script type="text/javascript" src="../Scripts/jquery.js"></script>
    <script type="text/javascript" src="../Scripts/jquery.pagination.js"></script>
    <script type="text/javascript" src="../Scripts/Pageination.js"></script>
    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


        .auto-style1 {
            width: 230px;
        }


    </style>
    
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table class="table table-bordered table-hover definewidth m10">
            <tr>
                <td class="tableleft">客户</td>
                <td>
                    <asp:DropDownList ID="ddlCustomer" runat="server">
                        <asp:ListItem>全部</asp:ListItem>
                        <asp:ListItem>UAES上海</asp:ListItem>
                        <asp:ListItem>UAES无锡</asp:ListItem>
                        <asp:ListItem>Bosch国外</asp:ListItem>
                        <asp:ListItem>Schneider</asp:ListItem>
                        <asp:ListItem>IRISO</asp:ListItem>
                        <asp:ListItem>TCS</asp:ListItem>
                        <asp:ListItem>Amphenol</asp:ListItem>
                        <asp:ListItem>AR</asp:ListItem>
                        <asp:ListItem>河北美泰</asp:ListItem>
                        <asp:ListItem>DELPHI</asp:ListItem>
                        <asp:ListItem>Bosch国内</asp:ListItem>
                        <asp:ListItem>TE</asp:ListItem>
                        <asp:ListItem>SIEMON</asp:ListItem>
                        <asp:ListItem>UAES西安</asp:ListItem>
                        <asp:ListItem>UAES芜湖</asp:ListItem>
                        <asp:ListItem>Hilite</asp:ListItem>
                        <asp:ListItem>Hella</asp:ListItem>
                        <asp:ListItem>湖州京昌</asp:ListItem>
                        <asp:ListItem>江苏奥利威</asp:ListItem>
                        <asp:ListItem>杭州乐荣</asp:ListItem>
                        <asp:ListItem>双林</asp:ListItem>
                        <asp:ListItem>西安昆仑</asp:ListItem>
                        <asp:ListItem>上海逸航</asp:ListItem>
                        <asp:ListItem>苏州汇川技术有限公司</asp:ListItem>
                        <asp:ListItem>天津斯巴克瑞</asp:ListItem>
                        <asp:ListItem>扬州奥力威</asp:ListItem>
                        <asp:ListItem>Valeo</asp:ListItem>
                        <asp:ListItem>其他</asp:ListItem>
                    </asp:DropDownList></td>
                <td></td>
            </tr>
            <tr>
                <td class="tableleft">报价单号范围</td>
                <td class="auto-style1">
                    <asp:TextBox ID="txtNo1" runat="server"></asp:TextBox></td>
                <td>
                    <asp:TextBox ID="txtNo2" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td class="tableleft"></td>
                <td class="auto-style1">
                    <asp:Button ID="BtnSubmit" CssClass="btn btn-primary" runat="server" Text="查询" OnClientClick="return Validate()" OnClick="BtnSubmit_Click"/>
                </td>
                <td></td>
            </tr>
                
            
             <%--<tr>
                <td class="tableleft"></td>
                <td>
                    <asp:Button ID="BtnSubmit" CssClass="btn btn-primary" runat="server" Text="查询" OnClientClick="return Validate()" OnClick="BtnSubmit_Click"/>
                </td>
            </tr>--%>
         </table>
    </div>
    <div>
     
         <table class="table table-bordered definewidth m10">
            <thead>
                <tr>
                    <th>报价单号</th>
                    <th>创建时间</th>
                    <th>当前状态</th>
                    <th>提报人</th>
                    <th></th>
                    <th></th>
                </tr>               
            </thead>
            <tbody id="Searchresult"></tbody>
            <tbody id="hiddenresult" style="display:none">
                <% for (int i = 0; i < resultList.Count; i++) { %>
                <tr class="result">
                    <td><% =resultList[i].Number %></td>
                    <td><% =resultList[i].WorkParent.CreateTime.ToString("yyyy-MM-dd") %></td>
                    <% if(resultList[i].WorkParent.StatusDefine==-1){ %>
                    <td><% =resultList[i].WorkParent.StatusNo%> / <%=resultList[i].WorkParent.NodeCount %> 已暂停</td>
                    <% }else if(resultList[i].WorkParent.StatusDefine==-2){ %>
                    <td><% =resultList[i].WorkParent.StatusNo%> / <%=resultList[i].WorkParent.NodeCount %> 已关闭</td>
                    <% }else if(resultList[i].WorkParent.StatusDefine==100){ %>
                    <td>已完成</td>
                    <% } else{%>
                    <td><% =resultList[i].WorkParent.StatusNo%> / <%=resultList[i].WorkParent.NodeCount %></td>
                    <% }%>
                    <td><% = resultList[i].DisplayName %></td>
                    <td><a  href="#" onclick="DetailUrl('../<%= resultList[i].WorkParent.WebName %>',<%= resultList[i].WorkParentId %>,-1)">详情</a></td>
                    <td><a href="#" onclick="UpLoad(<%= resultList[i].WorkParentId %>,-1)"><img src="../Images/176.png" title="" /></a></td>
                </tr>
                <% }%>
            </tbody>
         </table>
         <div id="Pagination" class="pagination definewidth m10"></div>
    </div>
    </form>
    <script type="text/javascript">
        $(document).ready(function () {
           var count = "<% =resultList.Count%>";
           if (count >= 10) {
               $("#Pagination").show();
           } else {
               $("#Pagination").hide();
           }
        });
        function Validate() {
            if ($("#txtNo1").val().length =0) {
                alert('请输入起始报价单号');
                return false;
            }
            //else if ($("#txtNo2").val().length = 0) {
            //    alert('请输入截止报价单号');
            //    return false;
            //}
        }
    </script>
</body>
</html>
